-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: integrate stableswap pallet #612
Conversation
Crate versions that have been updated:
Runtime version has been increased. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #612 +/- ##
==========================================
- Coverage 69.50% 69.22% -0.29%
==========================================
Files 162 163 +1
Lines 12633 12884 +251
==========================================
+ Hits 8781 8919 +138
- Misses 3852 3965 +113
☔ View full report in Codecov by Sentry. |
…p to 3. Once we have xyk, we extend it further
… someone wants to support then in hydra, so warning to change benchmark
# Conflicts: # Cargo.lock # integration-tests/Cargo.toml
pallets/dca/Cargo.toml
Outdated
@@ -34,7 +34,9 @@ hydradx-traits = { workspace = true } | |||
hydradx-adapters = { workspace = true } | |||
pallet-relaychain-info = { workspace = true } | |||
pallet-ema-oracle = { workspace = true } | |||
pallet-stableswap = { workspace = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DCA shoudn't be dependent on stableswap at all
traits/Cargo.toml
Outdated
@@ -1,6 +1,6 @@ | |||
[package] | |||
name = "hydradx-traits" | |||
version = "2.6.0" | |||
version = "2.6.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bump version not necessary
pallets/democracy/src/lib.rs
Outdated
@@ -179,6 +179,7 @@ pub mod weights; | |||
use crate::traits::DemocracyHooks; | |||
pub use conviction::Conviction; | |||
pub use pallet::*; | |||
pub use sp_std::vec; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait ..what? why ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my question exactly
…have better way to benchmark DCA
let (amount_in, _) = Self::calculate_in_amount(pool_id, asset_in, asset_out, amount_out) | ||
.map_err(ExecutorError::Error)?; | ||
if asset_out == pool_id { | ||
//I wanna buy 500 shares, how much luqidity i need provide to get 500 shares |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comment
Self::add_liquidity_shares(who, pool_id, amount_out, asset_in, max_limit) | ||
.map_err(ExecutorError::Error) | ||
} else if asset_in == pool_id { | ||
let shares_amount = max_limit; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inline
No description provided.